home *** CD-ROM | disk | FTP | other *** search
/ BMUG PD-ROM BV3 / BMUG PD-ROM Version BV3 (CDRM1097900).iso / HyperCard / Business / IT&P v8.1 / IT&P v8.1 / stack_-1.xml < prev   
Extensible Markup Language  |  1992-12-09  |  29KB  |  30 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.1</name>
  5.     <id>-1</id>
  6.     <cardCount>9</cardCount>
  7.     <cardID>7890</cardID>
  8.     <listID>5865</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>HintsHelp     -- Manages Help filesDoMarketData  -- Parses Market History and builds Min/Max data pointsDoHistoryData -- Parses Inv History and builds Min/Max data pointsDoDates       -- Puts dates in date labelsDoPlot        -- Does all Plotting on graphDoPCLabels    -- Does labels on left of graphDoJustify     -- Justifies Text in History Window & triggers AlertsPCFSize       -- Changes % fld text size (if to large) in Master EntriesHistOpen      -- sets up History window for manual editingHistClose     -- does History window calcs when manually editing dataDoAlertMsg    -- Alert Msg mgmt when column widths are exceededUDDoIt        -- Does History update when "Do It" btn selectedUDCleanUp     -- Handles history window mgmt when update goes wrong----------------------------------Functions---------------------------function theDataCol IFlag,wRMNIF IFlag is "Yes" thenIF wRMN is "4" then Put "5" into colelse IF wRMN is "5" then Put "2" into colelse Put wRMN into col --2,3,6,7 are OK for colelse --GTotalsIF wRMN is "1" then Put "2" into colelse IF wRMN is "2" then Put "3" into colelse IF wRMN is "3" then Put "2" into colelse Put wRMN into col  -- 4 thru 7 are OK for colend ifReturn colend theDataColfunction GetPCTxt wRMN,TFlagIF TFlag is "Yes" thenIF wRMN is 2 thenPut "Investment                 ¬†¬†¬†   Investment" into Textelse Put "¬†  ¬† Worth                       ¬†¬†   ¬†  Worth" into TextelseIF wRMN is 1 thenPut "     ¬†¬†Value                      ¬†¬†      ¬† Value" into Textelse IF wRMN is 2 thenPut "Investment                 ¬†¬†¬†   Investment" into Textelse Put "¬†  ¬† Worth                       ¬†¬†   ¬†  Worth" into Textend ifReturn Textend GetPCTxt----------------------------------------------------------------------on openStackGlobal userHold,CCFlag,CLFTFlagIF the userlevel<5 thenput the userLevel into userHoldset userLevel to 5end ifIf item 4 of screenRect() <= 342 then Hide menubarPut empty into CCFlagPut the short date into line 1 of cd fld "Current Date" of cd "Entry"Put line 4 of cd fld "Current Date" of cd "Entry" into CLFTFlagpass openStackend openStackon startUp --overrides userlevel set in the Home stack if not scriptingGlobal startups,userHoldAdd 1 to startupsIF startups = 1 then Send "startup" to HomeIF the userLevel<5 thenPut the userlevel into userHoldSet userLevel to 5end ifend startUpon closeStackGlobal userHold,CLFTFlagIF "ITPHG" is in windows() then close window "ITPHG"REPEAT with i = 1 to number of lines in windows()dChanger (line i of it), "0‚óäDismiss"end REPEATIF hilite of bg btn "PC Calc" of cd "DJ Indust" of bg "Chart Plot" thenSet hilite of bg btn "PC Calc" of cd "DJ Indust" of bg "Chart Plot" to falseend ifPut CLFTFlag into line 4 of cd fld "Current Date" of cd "Entry"IF userHold <> empty then Set the userLevel to userHoldShow menuBarpass closeStackend closeStackon suspendStackIF "ITPHG" is in windows() then Hide window "ITPHG"IF "SDates" is in windows() then dChanger SDates, "0‚óäDismiss"IF "Percentage" is in windows() then Send "mouseUp" to bg btn "PC Calc"pass suspendStackend suspendStackon resumeStackIF "ITPHG" is in windows() then Show window "ITPHG"pass resumeStackend resumeStackon HintsHelpIF Hilite of cd btn "UD Update" is True then ¬¨Send "mouseUp" to cd btn "UD Update"Put bg fld "Hist Info" of cd "Blank Inv" into HelpDataDelete line 1 of HelpDataPut Dialoger("InvHelp"&return&"Color green"&return&"on PrintHelp"¬¨, "4‚óäuserList Geneva,10,NoSelection"&return& HelpData¬¨) into dResultIF first word of dResult is "Error:" then Answer dResult with Cancelend HintsHelpon DoMarketDataGlobal CompFlag,CIName,SDFlag,SDLL,DLL,HM,DPs,MaxV,MinV,DifValue,¬¨IOPs,MaxIO,MinIO,TWValue,LWValue,NoDPsFlagSet cursor to 4Put Empty into DPsIF CompFlag is "Yes" thenPut cd fld ID 1 of cd CIName into VLelse Put cd fld ID 1 into VLPut replaceChar(VL," ",",") into VLPut getColumn(VL,"3") into DPsPut number of lines of DPs into LLIF SDFlag is "Yes" thenIF CompFlag<>"Yes" then Put SDLL into LLelse Put LL-DLL into LLend ifPut line LL-HM to LL of DPs into DPsGet minMax(DPs)Put item 1 of it into MinVPut item 2 of it into MaxVIF MaxV is "?" thenPut empty into DPsPut "Yes" into NoDPsFlag  --protects for N/A'sEXIT DoMarketDataelse Put MaxV-MinV into DifValueIF DifValue=0 and MaxV=MinV thenAdd 1 to MaxV --takes care of all values being same so HG will workSubtract 1 from MinVPut MaxV-MinV into DifValueend ifIF CompFlag<>"Yes" thenPut getColumn(VL,"2") into IOPsPut line LL-HM to LL of IOPs into IOPsGet minMax(IOPs)Put item 1 of it into MinIOPut item 2 of it into MaxIOIF MaxIO=MinIO and MaxIO=1 then Put "O" into MinIOelse Put "1" into MaxIOIF SDFlag<>"Yes" thenPut number of lines of DPs into LLPut line LL of DPs into TWValuePut line LL-1 of DPs into LWValueend ifend ifIF CompFlag is "Yes" then DoPlotelse DoDatesend DoMarketDataon DoHistoryDataGlobal IFlag,TFlag,wRMN,HM,MaxV,MinV,DifValue,IOPs,MaxIO,MinIO,¬¨CompFlag,CIName,DPs,SDFlag,SDLL,DLL,NoDPsFlagSet cursor to 4IF IFlag is "Yes" then Put "Inv History" into wIDataelse Put "GTotals" into wIDataIF CompFlag<>"Yes" and TFlag<>"Yes" thenPut cd fld ID 1 into IOPsPut replaceChar(IOPs," ",",") into IOPsPut getColumn(IOPs,"2") into IOPsend ifIF CompFlag="Yes" thenPut replaceChar(cd fld wIData of cd CIName,"|",",") into VLelse Put replaceChar(cd fld wIData,"|",",") into VLPut trim(VL,"¬¨.0-9-","All","Item") into VLPut theDataCol(IFlag,wRMN) into wColIF (IFlag is "Yes" and wRMN is "5") ¬¨or (TFlag is "Yes" and wRMN is "3") then Put wRMN into wCol2else Put wCol into wCol2Put getColumn(VL,wCol,wCol2) into DPsIF IFlag is "Yes" and wRMN is "5" thenPut getColumn(DPs,4) into A --worthPut getColumn(DPs,1) into B --invPut insColumn(B,A,2) into DPs --Inv then Worthend ifIF TFlag is "Yes" and wRMN is "3" thenPut getColumn(DPs,1) into A --worthPut getColumn(DPs,2) into B --invPut insColumn(B,A,2) into DPs --Inv then Worthend ifPut the number of lines of DPs into LLIF SDFlag is "Yes" thenIF CompFlag<>"Yes" then Put SDLL into LLelse Put LL-DLL into LLend ifIF line LL of DPs is empty then Delete line 1 of DPs --fluke w/HEProPut line LL-HM to LL of DPs into DPsGet minMax(DPs)Put item 1 of it into MinVPut item 2 of it into MaxVIF MaxV is "?" thenPut empty into IOPsPut empty into DPsPut "Yes" into NoDPsFlag  --protects for N/A'sEXIT DoHistoryDataelse Put MaxV-MinV into DifValueIF DifValue=0 and MaxV=MinV thenAdd 1 to MaxV --takes care of all values being same so HG will workSubtract 1 from MinVPut MaxV-MinV into DifValueend ifIF CompFlag<>"Yes" and TFlag<>"Yes" thenPut number of lines of IOPs into MLLPut number of lines of DPs into HLL --newIF SDFlag is "Yes" thenPut number of lines of cd fld wIData into HLLPut SDLL+(MLL-HLL) into LLIOelse put MLL into LLIOIF HM‚â§LLIO-1 then Put line LLIO-HM to LLIO of IOPs into IOPselse Put empty into IOPs  --protects when Market & History lines<>=IF IOPs<>empty thenGet minMax(IOPs)Put item 1 of it into MinIOPut item 2 of it into MaxIOIF MaxIO=MinIO and MaxIO=1 then Put "O" into MinIOelse Put "1" into MaxIOend ifend ifIF CompFlag is "Yes" then DoPlotelse DoDatesend DoHistoryDataon DoDatesGlobal LPT,HM,TFlag,SDFlag,SDLL,DLL,D1,D2,D3,D4,D5,MaxV,DifValue,xMajTSet cursor to 4Put Empty into D1Put Empty into D2Put Empty into D3Put Empty into D4Put Empty into D5IF LPT is "Market" thenPut cd fld ID 1 into VLPut replaceChar(VL," ",",") into VLelseIF TFlag is "Yes" then Put cd fld "GTotals" into VLelse Put cd fld "Inv History" into VLPut replaceChar(VL,"|",",") into VLend ifPut getColumn(VL,"1") into VLIF SDFlag is "Yes" then Put SDLL into LLelse Put the number of lines of VL into LLPut line LL-HM to LL of VL into VLPut trim(VL," ","A") into VLSet numberFormat to "0.000000"Put (DifValue/(333-173)*5)+MaxV into YPos --5=date label displacementIF HM Div 27>0 then put HM Div 27 into xMajT else Put "1" into xMajTIF HM>53 then put HM Mod XMajT into X else put "0" into XPut return&"tagBox = 0,"&YPos&",0,"&MaxV&","&¬¨first line of VL&return into D1IF HM>3 thenPut "tagBox = "&X+round(HM*.25) div xMajT*xMajT&","&YPos&","&¬¨X+round(HM*.25) div xMajT*xMajT&","&MaxV&","&¬¨line X+Round(HM*.25) div xMajT*xMajT+1 of VL&return into D2Put "tagBox = "&X+round(HM*.5) div xMajT*xMajT&","&YPos&","&¬¨X+round(HM*.5) div xMajT*xMajT&","&MaxV&","&¬¨line X+Round(HM*.5) div xMajT*xMajT+1 of VL&return into D3Put "tagBox = "&X+round(HM*.75) div xMajT*xMajT&","&YPos&","&¬¨X+round(HM*.75) div xMajT*xMajT&","&MaxV&","&¬¨line X+Round(HM*.75) div xMajT*xMajT+1 of VL&return into D4else IF HM=3 thenPut "tagBox = "&round(HM*.25)&","&YPos&","&round(HM*.25)¬¨&","&MaxV&","&line Round(HM*.25)+1 of VL&return into D2Put "tagBox = "&round(HM*.75)&","&YPos&","&round(HM*.75)¬¨&","&MaxV&","&line Round(HM*.75)+1 of VL&return into D4else IF HM=2 thenPut "tagBox = "&(HM*.5)&","&YPos&","&(HM*.5)¬¨&","&MaxV&","&line 2 of VL&return into D3end ifPut "tagBox = "&HM&","&YPos&","&HM&","&MaxV&","& ¬¨last line of VL into D5DoPlotend DoDateson DoPlot   --Universal for Market,DJ Stuff GTotals and ComparesGlobal HM,MinV,MaxV,DifValue,CompFlag,Comp,LPT,CIName,LEG,wrap,wPat,¬¨D1,D2,D3,D4,D5,wRMN,DPs,RGT,LGT,xMajT,IOPs,MaxIO,MinIO,PP,IFlag,¬¨TFlag,SDFlag,SDLL,IName,wrapPP,CompLabels,OLPT,ITPColorSet cursor to 4IF ITPColor is "Yes" and ¬¨(item 5 of listMonitors() <> "Color" or ¬¨item 6 of listMonitors() <4) then Put empty into ITPColorlock screenSet numberFormat to "0"IF CompFlag is "Yes" thenIF LPT is "History" thenIF wRMN is "5" then Put "2" into PR else Put "1" into PRelse Put "1" into PRIF wrap is empty then Put "1" into wrapIF Comp is 1 thenIF PR>1 then Put "4,3" into wPatelseIF wrap is 1 then Put "2" into wPatelseIF number of items of wPat<2 then Put trunc(wPat+1) into wPatelse Put trunc(item 1 of wPat+1) into wPatend ifend ifelseIF PR>1 thenIF number of items of wPat>1 thenPut trunc(item 1 of wPat+2) into item 1 of wPatPut trunc(item 2 of wPat+2) into item 2 of wPatelsePut trunc(wPat+1) into P1Put trunc(wPat+2) into P2Put P2&","&P1 into wPatend ifelseIF number of items of wPat<2 then Put trunc(wPat+1) into wPatelse Put trunc(item 1 of wPat+1) into wPatend ifend ifelseIF (IFlag is "Yes" and wRMN is "5") ¬¨or (TFlag is "Yes" and wRMN is "3") then Put "2,1" into wPatelse Put "auto" into wPatend if--for in/out Bar at bottom of graph (not for GTs or Compares)IF CompFlag<>"Yes" and TFlag<>"Yes" and IOPs<>empty thenPut empty into optPut setOption("windowBounds = 36,336,469,339",opt) into optPut setOption("plotBounds = 36,337,469,512",opt) into optPut setOption("gridType = none",opt) into optPut setOption("plotFrame = false",opt) into optPut setOption("plotLineSize = 3",opt) into optPut setOption("plotPattern = 1",opt) into optPut setOption("XMax = "&HM,opt) into optPut setOption("YMax = "&MaxIO,opt) into optPut setOption("YMin = "&MinIO,opt) into optPut empty into xVectorPut hyperGraph(xVector,IOPs,opt) into outIF word 1 of out is "Error:" thenbeep 1Put outunlock screen with dissolveEXIT to HyperCardend ifPut empty into IOPsPut empty into optPut empty into outchoose select tooldoMenu "Paste Picture"doMenu "Transparent"end ifSet numberFormat to "0.##########"IF MaxV‚â•10000 or MinV‚â§-1000 then Put "0" into yAPelse Put "2" into yAPPut line Round(HM*.125)+1 of DPs into MPosXPut MPosX into MPosIF MPos contains "," then Put Average(MPos) into MPosIF MPos< (DifValue/2)+MinV thenPut (DifValue/(333-173)*-4)+MaxV into YPosLelse  -- the -4,26,38 are legend pixel offsets based on 12.5% data ptIF MPosX contains "," then Put "38" into LF else put "26" into LFPut (DifValue/(333-173)*LF)+MinV into YPosLend ifPut (HM/432)*4 into XPosLIF HM‚â•216 then Put "2" into pLS else Put "2" into pLS --Plot line sizePut empty into optIF CompFlag<>"Yes" thenIF HM‚â•54 thenPut "dotted" into GridTIF HM‚â•216 then Put "2" into xMinT else Put "1" into xMinTelsePut "gray" into GridTPut "nan" into xMinTend ifPut "noOverlay" into OLelse --ComparePut "none" into GridTPut "nan" into xMinTPut "overlayData" into OLPut setOption("windowBounds = 37,174,468,332",opt) into optend if--for main graph (including Compare overlays)Put setOption("yMin = "&MinV*1,opt) into optPut setOption("xMax = "&HM,opt) into optPut setOption("yMax = "&(DifValue/(333-173)*1)+MaxV,opt) into opt --MaxV*1Put setOption("xOrigin = "&HM,opt) into optPut setOption("gridType = "&GridT,opt) into optPut setOption("xMajorTics = "&xMajT,opt) into optPut setOption("xMinorTics = "&xMinT,opt) into optPut setOption("yMajorTics = "&DifValue/10,opt) into optPut setOption("yMinorTics = "&DifValue/10/4,opt) into optPut setOption("plotLineSize = "&pLS,opt) into optPut setOption("overlay = "&OL,opt) into optIF ITPColor is "Yes" thenIF number of items of wPat>1 thenIF CompFlag is "Yes" then Put setOption("plotColor = magenta,cyan",opt) into optelse Put setOption("plotColor = red,green",opt) into optelseIF CompFlag is "Yes" then Put setOption("plotColor = blue",opt) into optelse Put setOption("plotColor = green",opt) into optend ifelse Put setOption("plotColor = auto",opt) into optPut setOption("plotPattern = "&wPat,opt) into optPut setOption("yAxisPrecision = "&yAP,opt) into opt--Put setOption("axisScaleFontStyle = condense",opt) into opt --will make font for right labels same as left graph labels (condensed)--Put setOption("textBoxColor = Black",opt) into opt  --default?IF CompFlag<>"Yes" thenIF IFlag is "Yes" and wRMN is "5" then Put "Investment,Worth" into DRGTelse IF TFlag is "Yes" and wRMN is "3" then Put "Total Vestment,Total Worth" into DRGTelse Put RGT into DRGTPut setOption("legend = "&XPosL&","&YPosL&","&DRGT,opt) into optPut D1 after optIF D2<>empty then Put D2 after optIF D3<>empty then Put D3 after optIF D4<>empty then Put D4 after optPut D5 after optelse Put setOption("legend = ",opt) into optPut empty into xVectorPut hyperGraph(xVector,DPs,opt) into outIF word 1 of out is "Error:" thenbeep 2Put outPut empty into CompFlagPut empty into Compunlock screen with dissolveEXIT to HyperCardend ifchoose select tooldoMenu "Paste Picture"IF ITPColor is "Yes" thenIF CompFlag is "Yes" thenPicture "ITPHG",clipboard,rect,falseset loc of window "ITPHG" to "37,174"elsePut setOption("windowBounds = 37,174,468,332",opt) into optPut hyperGraph(xVector,DPs,opt) into out --need to get colorPicture "ITPHG",clipboard,rect,falseset loc of window "ITPHG" to "37,174"end ifend ifPut empty into DPsPut empty into outPut empty into optIF CompFlag is "Yes" then -- for Compare legends at top onlySet numberFormat to "0"IF wrapPP is empty then Put "1" into wrapPPHide cd fld "Inv Activity"IF wrapPP is "1" thenPut setOption("windowBounds = 99,23,220,102",opt) into optPut setOption("plotBounds = 88,22,351,105",opt) into optelsePut setOption("windowBounds = 221,23,342,102",opt) into optPut setOption("plotBounds = 210,22,473,105",opt) into optend ifPut setOption("gridType = none",opt) into optPut setOption("plotLines = false",opt) into optPut setOption("plotLineSize = "&pLS,opt) into optPut setOption("XMax = 200",opt) into optPut setOption("XMin = 0",opt) into optPut setOption("YMax = 1",opt) into optPut setOption("YMin = 0",opt) into optIF IName<>CIName then Put setOption("legendFontStyle = Bold",opt) into optIF LEG is empty then Put "9,.98" into LEGIF IName=CIName thenIF PR>1 then Put ",Ivestment,Worth" after LEGelse Put ","&RGT after LEGelseIF LPT is "Market" and MinV>0 thenSet numberFormat to "0.0"Put ","&CIName&&DifValue/MinV*100&"%" after LEGelse Put ","&CIName after LEGend ifIF PP is empty then Put wPat into PPelse Put ","&wPat after PPIF number of items of PP>4 then Hide cd fld "Label 2"Put setOption("legend = "&LEG,opt) into optPut setOption("plotPattern = "&PP,opt) into optPut empty into xVectorPut "1,1,1,1"&return&"0,0,0,0" into FakeItPut hyperGraph(xVector,FakeIt,opt) into outIF word 1 of out is "Error:" thenbeep 3Put outPut empty into CompFlagPut empty into Compunlock screen with dissolveEXIT to HyperCardend ifPut empty into optPut empty into outIF number of items of PP‚â•4 thenPut empty into LEGPut empty into PPIF wrapPP is 1 then Add 1 to wrapPP else Put "1" into wrapPPend ifIF Comp is 4 thenIF wrap is 1 then Add 1 to wrap else Put "1" into wrapend ifchoose select tooldoMenu "Paste Picture"else doMenu "Transparent"choose browse toolHide cd fld "S1"unlock screen with dissolveIF CompFlag<>"Yes" thenShow cd fld "Inv Activity"Show cd fld "Label 2"Put empty into LEGPut empty into wrapPut empty into wrapPPPut empty into PPPut empty into CompPut empty into CompLabelsPut empty into OLPTPut RGT into LGTSet numberFormat to "0"Put HM*1 into word 1 of line 7 of bg fld "DVSGS"Put LGT into line 9 of bg fld "DVSGS"Put wRMN into line 10 of bg fld "DVSGS"Put getDate(last item of D1) into line 12 of bg fld "DVSGS"Put getDate(last item of D5) into line 13 of bg fld "DVSGS"IF SDFlag is "Yes" thenPut "Yes" into line 11 of bg fld "DVSGS"Put SDLL into line 14 of bg fld "DVSGS"end ifSet numberFormat to "0.##########"Put MaxV into line 15 of bg fld "DVSGS"Put MinV into line 16 of bg fld "DVSGS"Put DifValue into line 17 of bg fld "DVSGS"Put empty into line 20 of bg fld "DVSGS"Put empty into line 21 of bg fld "DVSGS"DoPCLabelselse --ComparePut "Compare" into line 20 of bg fld "DVSGS"IF CompLabels is "Yes" thenPut "Yes" into line 21 of bg fld "DVSGS"Put empty into fld 1DoPCLabelselseIF "%" is not in fld 1 thenPut empty into line 21 of bg fld "DVSGS"Put LPT into OLPT                 --cheats a littleIF (line 9 of bg fld "DVSGS") contains "Market" thenPut "Market" into LPTPut empty into CompFlag         --clears flag earlyelse Put empty into LPTPut line 15 of bg fld "DVSGS" into MaxVPut line 16 of bg fld "DVSGS" into MinVPut line 17 of bg fld "DVSGS" into DifValuePut empty into fld 1DoPCLabelsPut OLPT into LPT                 --restoresend ifend ifend ifend DoPloton DoPCLabels    -- does market % or history values last after PlottingGlobal MinV,MaxV,DifValue,CompFlag,LPTSet numberFormat to "0.0000"IF LPT is "Market" and CompFlag is empty thenIF MinV>0 then                  --no div by zero problemsPut (DifValue/MinV) into MVIF MV‚â•1 then Put "0" into Pelse IF MV‚â•.1 then Put "0.0" into Pelse IF MV‚â•.01 then Put "0.00" into Pelse IF MV‚â•.001 then Put ".000" into PPut (DifValue/MinV)/10 into DVelse --take care of $1.00 casePut DifValue/10 into DVPut DifValue into MVPut "0" into Pend ifSet numberFormat to PREPEAT with B=10 down to 0Set cursor to busyPut ABS(MV-(B*DV))*100&"%" into line (B+1) of fld 1end REPEATelsePut DifValue/10 into DVPut MaxV into MVIF MV‚â•100000 or MinV‚â§-10000 thenPut MV/10 into MVPut DV/10 into DVPut "0" into Pelse IF MV‚â•10000 or MinV‚â§-100 then Put "0" into Pelse IF MV‚â•1000 or MinV‚â§-10 then Put "0.0" into Pelse IF MV‚â•100 or MinV‚â§-1 then Put "0.00" into Pelse IF MV‚â•10 or MinV‚â§-.1 then Put "0.000" into Pelse IF MV‚â•1 or MinV‚â§-.01 then Put "0.0000" into PIF LPT is "Market" and MV<1000 then Put "0.00" into PSet numberFormat to PREPEAT with B = 10 down to 0Set cursor to busyPut MV-(B*DV) into line (B+1) of fld 1end REPEATend ifend DoPCLabelson DoJustifyGlobal HA,HB,HNPFlag,OffenderPut Empty into HBPut Empty into HNPFlagIF (the number of Chars of word 1 of HA) >8 thenPut "Date" into OffenderDoAlertMsgelse Put justify (word 1 of HA,R,9) into HBIF (the number of Chars of word 2 of HA) >10 thenPut "Investment" into OffenderDoAlertMsgelse Put " |"&(justify (word 2 of HA,R,11)) after last word of HBIF (the number of Chars of word 3 of HA) >10 thenPut "Shares" into OffenderDoAlertMsgelse Put " |"&(justify (word 3 of HA,R,11)) after last word of HBIF (the number of Chars of word 4 of HA) >7 thenPut "Value" into OffenderDoAlertMsgelse Put " |"&(justify (word 4 of HA,R,8)) after last word of HBIF (the number of Chars of word 5 of HA) >10 thenPut "My Worth" into OffenderDoAlertMsgelse Put " |"&(justify (word 5 of HA,R,11)) after last word of HBIF (the number of Chars of word 6 of HA) >10 thenPut "Gain/Loss" into OffenderDoAlertMsgelse Put " |"&(justify (word 6 of HA,R,11)) after last word of HBIF (the number of Chars of word 7 of HA) >7 thenPut "% Return" into OffenderDoAlertMsgelse Put " |"&(justify (word 7 of HA,R,8)) after last word of HBPut Empty into HAend DoJustifyon PCFSize PC,wPCIF wPC is "TotPC" then Put "14" into TH else Put "11" into THIF the number of chars of PC >= 5 thenSet textFont of cd fld wPC of cd "Entry" to ITPSet textSize of cd fld wPC of cd "Entry" to 8Set textHeight of cd fld wPC of cd "Entry" to THelseSet textFont of cd fld wPC of cd "Entry" to GenevaSet textSize of cd fld wPC of cd "Entry" to 9Set textHeight of cd fld wPC of cd "Entry" to THend ifend PCFSizeon HistOpenGlobal TFlag,ALLSelectIF TFlag<>"Yes" then Put cd fld "Inv History" into ALLSelectelse Put cd fld "GTotals" into ALLSelect --saves entire orig fldend HistOpenon HistClose --Indv Investments onlyGlobal LN,UDL,UDFlag,ALLSelect,LSelect,EAlert,OffenderSet cursor to 4lock ScreenPut "Inv History" into wfldIF UDFlag is "Yes" then Put UDL into LNelsePut word 2 of selectedline() into LNPut line LN of ALLSelect into LSelect --orig line in fldend ifPut empty into ALLSelectPut word 3 of line LN of cd fld wfld into LVest   -- VestmentPut word 5 of line LN of cd fld wfld into LShares -- SharesPut word 7 of line LN of cd fld wfld into LNAV    -- ValueIF LShares<>Empty and LNAV<>Empty thenPut Empty into cd fld "DF"   -- hidden Dummy Fld needed for roundingSet the numberFormat to "0.00" -- to 2 digits for proper # of spacesIF LVest contains "|" thenPut "Investment" into OffenderPut "Yes" into EAlert        -- Entry AlertDoAlertMsgEXIT HistCloseend ifIF LShares contains "|" thenPut "Shares" into OffenderPut "Yes" into EAlertDoAlertMsgEXIT HistCloseend ifIF LNAV contains "|" thenPut "Value" into OffenderPut "Yes" into EAlertDoAlertMsgEXIT HistCloseend ifPut LShares*LNAV into LMyWorthPut LMyWorth into cd fld "DF"Put cd fld "DF" into LMyWorthIF (the number of Chars of LMyWorth) >10 thenPut "My Worth" into OffenderPut "Yes" into EAlertDoAlertMsgEXIT HistCloseelse Put "|"&(justify (LMyWorth,R,11)) into tempPut Empty into HNPFlagPut temp&" " into char 47 to 59 of line LN of cd fld wfldIF LVest<>Empty thenPut LMyWorth-LVest into LGLPut LGL into cd fld "DF"Put cd fld "DF" into LGLIF (the number of Chars of LGL) >10 thenPut "Gain/Loss" into OffenderPut "Yes" into EAlertDoAlertMsgEXIT HistCloseelse Put "|"&(justify (LGL,R,11)) into tempPut Empty into HNPFlagPut temp&" " into char 60 to 72 of line LN of cd fld wfldSet the numberFormat to "0.0"Put LGL/LVest*100 into LPCPut LPC into cd fld "DF"Put cd fld "DF" into LPCIF LPC contains "INF" thenPut "|  GREAT%" into char 73 to 81 of line LN of cd fld wfldelse IF LPC contains "NAN" thenPut "|    N/A%" into char 73 to 81 of line LN of cd fld wfldelseIF (the number of Chars of LPC) >7 thenPut "% Return" into OffenderPut "Yes" into EAlertDoAlertMsgEXIT HistCloseend ifPut "|"&(justify (LPC,R,7)) into tempPut temp&"%" into char 73 to 81 of line LN of cd fld wfldend ifPut Empty into HNPFlagend ifend ifunlock screen with wipe rightend HistCloseon DoAlertMsgGlobal HNPFlag,TFlag,EAlert,LN,LSelect,OffenderPut "Y" into HNPFlagAnswer "   "&Offender&" column has to much data in it!"Answer " Select "&quote&"?"&quote&" for more info on manual editing!"IF EAlert is "Yes" then           --restore orig dataAnswer " I'll restore original data for this line, Sorry!"IF TFlag<>"Yes" then Put LSelect into line LN of cd fld "Inv History"else Put LSelect into line LN of cd fld "GTotals"end ifend DoAlertMsgon UDDoItGlobal typeUpDate,UDAmount,UDL,UDFlag,EAlert,TFlag,wUDLC,wUDfld,¬¨LSelect,Offender,LNSet cursor to 4Put "Yes" into UDFlagPut the number of lines of cd fld wUDfld into theLLIF theLL=UDL thenUDCleanUp TFlag,wUDLC,wUDfldAnswer "LAST line can't be updated with this feature!"Put Empty into UDFlagExit UDDoItend ifIF TFlag is "Yes" thenIF typeUpDate is "Worth" then Put "3" into wwd else Put "5" into wwdelseIF typeUpDate is "Shares" then Put "5" into wwd else Put "3" into wwdend ifREPEAT until theLL=UDLPut line UDL of cd fld wUDfld into LSelect --in case of recoveryIF typeUpDate is "Shares" then  -- shares only, other wwd are moneyIF "." is not in word wwd of line UDL of cd fld wUDfld thenPut "0" into DecFmtelsePut find(word wwd of line UDL of cd fld wUDfld,".","char") into APut the number of chars of word wwd ¬¨of line UDL of cd fld wUDfld into SomDNoPut SomDNo-(item 2 of A) into DecCLocIF DecCLoc is "0" thenAnswer "A Shares number can't end in a decimal. Fix it!" with "OK"Put Empty into UDFlagSend "mouseUp" to cd btn "UD Update"Exit to HyperCardelse IF DecCLoc is "1" thenPut "0.0" into DecFmtelse IF DecCLoc is "2" thenPut "0.00" into DecFmtelse IF DecCLoc is "3" thenPut "0.000" into DecFmtelse IF DecCLoc is "4" thenPut "0.0000" into DecFmtend ifSet numberFormat to DecFmtend ifelseSet numberFormat to "0.00"end ifPut word wwd of line UDL of cd fld wUDfld into OldNoPut UDAmount*1 + OldNo into NewNoIF TFlag is "Yes" then Put "11" into nChar else Put "10" into nCharIF (number of chars of NewNo) >nChar thenPut typeUpDate into OffenderPut "Yes" into EAlertPut UDL into LNDoAlertMsgEXIT REPEATelseIF TFlag is "Yes" thenPut "|"&(justify (NewNo,R,12)) into tempIF wwd is "3" then Put temp&" " into char 10 to 23 of line UDL of cd fld wUDfldelse Put temp&" " into char 24 to 37 of line UDL of cd fld wUDfldelsePut "|"&(justify (NewNo,R,11)) into tempIF wwd is "3" then Put temp&" " into char 11 to 23 of line UDL of cd fld wUDfldelse Put temp&" " into char 24 to 36 of line UDL of cd fld wUDfldend ifend ifPut Empty into HNPFlagIF TFlag<>"Yes" then HistCloseelse Send "GTotalClose" to cd "GTotals"IF EAlert is "Yes" then EXIT REPEATPut UDL+1 into UDLend REPEATPut Empty into UDFlagIF EAlert is empty thenPut "That completes the"&return&"updating process." into cd fld S1Show cd fld S1Wait 3 secondsHide cd fld S1else Put empty into EAlertIF TFlag is "Yes" then Send "mouseUp" to cd btn "GT Update"else Send "mouseUp" to cd btn "UD Update"end UDDoIton UDCleanUp TFlag,wUDLC,wUDfldIF TFlag is "Yes" thenIF wUDLC>7 then Set the scroll of cd fld wUDfld to (wUDLC*12)-85else Set the scroll of cd fld wUDfld to 0Set rect of cd fld wUDfld to "0,43,512,130"elseIF wUDLC>8 then Set the scroll of cd fld wUDfld to (wUDLC*12)-97else Set the scroll of cd fld wUDfld to 0Set rect of cd fld wUDfld to "0,31,512,130"end ifend UDCleanUp</script>
  17.     <background id="2792" file="background_2792.xml" name="" />
  18.     <background id="2999" file="background_2999.xml" name="Entry Background" />
  19.     <background id="4561" file="background_4561.xml" name="Chart Plot" />
  20.     <card id="7890" file="card_7890.xml" marked="false" name="Intro" owner="2792" />
  21.     <card id="3760" file="card_3760.xml" marked="false" name="Entry" owner="2999" />
  22.     <card id="7586" file="card_7586.xml" marked="false" name="DJ Indust" owner="4561" />
  23.     <card id="8842" file="card_8842.xml" marked="false" name="DJ Trans" owner="4561" />
  24.     <card id="2062" file="card_2062.xml" marked="false" name="NYCI" owner="4561" />
  25.     <card id="11686" file="card_11686.xml" marked="false" name="GTotals" owner="4561" />
  26.     <card id="6550" file="card_6550.xml" marked="false" name="Blank Inv" owner="4561" />
  27.     <card id="2531" file="card_2531.xml" marked="false" name="Sample 1" owner="4561" />
  28.     <card id="7167" file="card_7167.xml" marked="false" name="Sample 2" owner="4561" />
  29. </stack>
  30.